//
//  GizProductUI.h
//  PhnixHome
//
//  Created by Levy Xu on 2018/3/6.
//  Copyright © 2018年 Levy Xu. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface GizPosition : NSObject
@property(nonatomic, assign) NSInteger bit_offset;
@property(nonatomic, assign) NSInteger len;
@property(nonatomic, strong) NSString *unit;
@property(nonatomic, assign) NSInteger byte_offset;
@end

@interface GizUintSpec : NSObject
@property(nonatomic, assign) NSInteger addition;
@property(nonatomic, assign) NSInteger max;
@property(nonatomic, assign) NSInteger ratio;
@property(nonatomic, assign) NSInteger min;
@property(nonatomic, assign) NSInteger step;
@end

@interface GizAttr : NSObject
@property(nonatomic, strong) NSString *display_name;
@property(nonatomic, strong) NSString *name;
@property(nonatomic, strong) NSString *data_type;
@property(nonatomic, strong) GizPosition *position;
@property(nonatomic, strong) GizUintSpec *uint_spec;
@property(nonatomic, strong) NSString *type;
@property(nonatomic, assign) NSInteger attr_id;
@property(nonatomic, strong) NSString *desc;
@end

@interface GizEntity : NSObject
@property(nonatomic, assign) NSInteger entity_id;
@property(nonatomic, strong) NSString *display_name;
@property(nonatomic, strong) NSArray *attrs;
@property(nonatomic, strong) NSString *name;
@end

@interface GizElementObject : NSObject
@property(nonatomic, strong) NSString *action;
@property(nonatomic, strong) NSArray *bind;
@property(nonatomic, strong) NSString *perm;
@property(nonatomic, strong) GizUintSpec *uint_spec;
@end

@interface GizElement : NSObject
@property(nonatomic, strong) GizElementObject *object;
@property(nonatomic, strong) NSString *type;
@property(nonatomic, strong) NSString *key;
@property(nonatomic, strong) NSString *title;
@property(nonatomic, strong) NSArray *items;
@property(nonatomic, strong) NSString *bind;
@property(nonatomic, assign) NSInteger value;
@property(nonatomic, assign) NSInteger maximumValue;
@property(nonatomic, assign) NSInteger minimumValue;
@property(nonatomic, assign) BOOL boolValue;
@end

@interface GizSection : NSObject
@property(nonatomic, strong) NSArray *elements;
@end

@interface GizUIObject : NSObject
@property(nonatomic, assign) NSInteger version;
@property(nonatomic, assign) BOOL showEditButton;
@end

@interface GizUI : NSObject
@property(nonatomic, strong) GizUIObject *object;
@property(nonatomic, strong) NSArray *sections;
@end

@interface GizProductUI : NSObject
@property(nonatomic, strong) NSString *name;
@property(nonatomic, strong) NSArray *entities;
@property(nonatomic, strong) NSString *protocolType;
@property(nonatomic, strong) NSString *product_key;
@property(nonatomic, strong) NSString *packetVersion;
@property(nonatomic, strong) GizUI *ui;
@end
